package model

import (
	"course-hub/user-srv/basic/handler/config"
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30);comment:用户名"`
	Password string `gorm:"type:varchar(32);comment:密码"`
	Tel      string `gorm:"type:char(11);comment:手机号"`
	Status   string `gorm:"type:varchar(30);comment:状态"`
	Qx       string `gorm:"type:varchar(30);comment:权限"`
	Js       string `gorm:"type:varchar(30);comment:角色"`
}

func Register(data *User) error {

	return config.DB.Create(&data).Error
}
